package com.pj.android.brower.util


/**
 *Create By hHui on 2018/9/27
 */
class Config {

    companion object {
        val instance: Config by lazy {
            Config()
        }
    }

    var mainUrl: String = ""
        set(value) {
            field = value
            SPUtils.instance.put(Constants.Sp.MAIN_URL_KEY, value, true)
        }
        get() {
            return SPUtils.instance.getString(Constants.Sp.MAIN_URL_KEY, Constants.defaultUrl)
        }

    var deviceToken: String = ""
        set(value) {
            field = value
            SPUtils.instance.put(Constants.Sp.DEVICE_TOKEN, value, true)
        }
        get() {
            return SPUtils.instance.getString(Constants.Sp.DEVICE_TOKEN, "")
        }
}